<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>创业者服务首页</title>
		<link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css"/>
		<link rel="stylesheet" type="text/css" href="../css/style.css"/>
		<link rel="stylesheet" href="../css/leftSidebar.css">
	</head>
	<style type="text/css">
	html,body{height: 100%;padding-bottom: 50px;}
		.col-xs-12.nav_right{padding: 0;height: 100px;padding-right: 0;margin-right: 0;min-width: 1100px;height: 100px;padding-right: 0;margin-right: 0;padding-left: 160px;}
		#myTab a{color: #7c7c7c; ;font-size: 15px;}
		#myTab>li.active>a{color: #3f4142; background-color: #fff;}
		.navbar-form{margin-top: 0;}
		.tab_creat .active{color:#6bc50d;}
		.table>tbody>tr.active>td, .table>tbody>tr.active>th, .table>tbody>tr>td.active, .table>tbody>tr>th.active, .table>tfoot>tr.active>td, .table>tfoot>tr.active>th, .table>tfoot>tr>td.active, .table>tfoot>tr>th.active, .table>thead>tr.active>td, .table>thead>tr.active>th, .table>thead>tr>td.active, .table>thead>tr>th.active{background-color: #fff;}
		.table>tfoot>tr.active>td{background-color: #fff;}
		.table>tbody>tr>td{border-top:0;}
		.table{margin-bottom: 0;}
		div.tab_creat.row{background-color: #fff;}
		.tab_font{padding: 10px 0;}
		.tab_font div,.tab_font td{font-size: 14px; ;color: #919191;}
		.gongsi_list div.col-xs-2{padding-top:10px;padding-bottom: 10px;text-align: center;}
		.gongsi_list.row{padding: 20px;background-color: #fff;margin-top: 20px;border: 1px solid #ddd;}
		.gongsi_list dd div.col-xs-2{height: 60px;line-height: 60px;font-size: 14px; ;color: #4f5051;}
		.row{margin: 0;	}
		
		.sub_logo{position: relative;display: inline-block;padding-left: 0;}
		.sub_logo input{opacity: 0;position: absolute;width: 100%;top: 0;bottom: 0;}
		.zhube_head{border-bottom: 1px solid #ddd;}
		.zhube_head h3{padding: 5px 0;, ;color: #222c38;font-size: 16px;border-bottom: 4px solid #5a626d;}
			
		#form_test1 label,#form_test2 label{font-size: 14px; ;color: #515151;font-weight: normal;}
		#form_test1  .media-middle,#form_test2  .media-middle{font-size: 14px;color: #acacac;}
		.form_tip{font-size: 12px;color: #acacac; ;}
		.btn-default{border-color: #d5272d ;color: #d5272d ;}
		.btn-default.disabled{background-color: #ccc;color: #fff;border-color:#ccc;}
		.btn-default.disabled.focus, .btn-default.disabled:focus, .btn-default.disabled:hover, .btn-default[disabled].focus, .btn-default[disabled]:focus, .btn-default[disabled]:hover, fieldset[disabled] .btn-default.focus, fieldset[disabled] .btn-default:focus, fieldset[disabled] .btn-default:hover{background-color: #ccc;color: #fff;}
		.btn_next{width: 180px;margin-top: 30px;}
		.btn_next,.btn_back{margin-bottom: 50px;}
		
		.form-group .xiangmuInfo{color: #f00;}
	</style>
	<body style="background-color: #f2f2f2;">
		<div class="row warp" style="height: 100%;">
			<div class="nav_right_head">
				<a href="../index.html"><img src="../img/roleIndexBg.jpg"/></a>
			</div>
			<!--左侧导航-->
			<div class="col-xs-2 nav_left">
				<div class="creatNav">创业者服务</div>
				<div class="creatLoginStatus"><img src="../img/avtar.png"><a>您好，创业者</a></div>
				<div class="list-group" style="padding: 0;">
					<a href="cyzfw_index.html" class="list-group-item "><i class="glyphicon glyphicon-home"></i> 首页</a>
					<a href="cyzfw_zuche.html" class="list-group-item active"><i class="glyphicon glyphicon-plus-sign"></i> 注册项目</a>
					<a href="cyzfw_myProgress.html" class="list-group-item"><i class="glyphicon glyphicon-folder-open"></i> 我的项目</a>
					<a href="cyzfw_mynews.html" class="list-group-item"><i class="glyphicon glyphicon-book"></i> 我的消息</a>
					<div class="list-group listAttention">
						<div class="list-group-item" > <span class="caret"></span> 我的关注</div>
						<a href="cyzfw_gz_touziren.html" class="list-group-item"><i class="glyphicon glyphicon-usd"></i> 投资人/机构</a>
						<a href="cyzfw_gz_daoshi.html" class="list-group-item"><i class="glyphicon glyphicon-user"></i> 导师</a>
						<a href="cyzfw_gz_xiangmu.html" class="list-group-item"><i class="glyphicon glyphicon-lock"></i> 项目</a>
					</div>

				</div>
				<div class="backBtn"> <a href="../index.html"><img src="../img/backIndex.png"></a></div>
			</div>
			
			<div class="col-xs-12 nav_right">

					<div class="row" style="margin-top: 10px;">
					<div class="col-xs-8 col-xs-offset-2">
							<div class="zhube_head clearfix">
								<h3 class="pull-left">认证信息</h3>
							</div>
							<form class="form-horizontal" id="form_test2" style="padding: 20px 0;"  action="http://114.112.96.184:18080/auth/startup" method="post" enctype="multipart/form-data">
							  <div class="form-group">
							    <label for="userName" class="col-sm-3 control-label"><span class="xiangmuInfo">*</span>真实姓名</label>
							    <div class="col-sm-8">
							      <input type="text" class="form-control" id="userName" name="realName" datatype="*" nullmsg="请输入真实姓名" placeholder="输入中文真实姓名">
							    </div>
							  </div>
							  <div class="form-group">
							    <label for="work" class="col-sm-3 control-label"><span class="xiangmuInfo">*</span>职位</label>
							    <div class="col-sm-8">
							      <input type="text" class="form-control" name="dept" id="work" datatype="*" nullmsg="请输入职位" placeholder="输入职位">
							    </div>
							  </div>
							   <div class="form-group">
							    <label for="phoneNumbar" class="col-sm-3 control-label"><span class="xiangmuInfo">*</span>手机号码</label>
							    <div class="col-sm-8">
							      <input type="tel"  class="form-control" id="phoneNumbar" name="mobile" placeholder="输入手机号码">
							    </div>
							  </div>
							  <div class="form-group">
							    <label for="factoryEmal" class="col-sm-3 control-label">公司邮箱</label>
							    <div class="col-sm-8">
							      <input type="text" class="form-control" id="factoryEmal" name="email" placeholder="输入公司邮箱，便于审核">
							    </div>
							  </div>
							  <div class="form-group">
							    <label for="WXnumber" class="col-sm-3 control-label"><span class="xiangmuInfo">*</span>个人微信</label>
							    <div class="col-sm-8">
							      <input type="text" class="form-control" id="WXnumber" name="weChat" datatype="*" nullmsg="请输入微信号"  placeholder="输入微信号，方便联系">
							    </div>
							  </div>
							
							   	
							   <div class="form-group">
							    <label for="up" class="col-sm-3 control-label"><span class="xiangmuInfo">*</span>个人名片</label>
							    <div class="col-sm-8">
							    	<div class="sub_logo col-xs-4">
							    	<img src="../img/defaultAvatar.png"style="vertical-align: middle;width: 90px;height: 90px;"  id="ImgPr"/>
							    		<input type="file" id="up" name="pic" datatype="*" nullmsg="请上传个人名片！" value="" multiple="multiple"/>
							    	</div>
							    <span class="media-middle" style="display: inline-block;margin-top: 30px;">建议上传尺寸90mm*50mm</span>
							    </div>
							  </div>
							  
							  <div class="form-group">
							    <label for="up2" class="col-sm-3 control-label"><span class="xiangmuInfo">*</span>头像</label>
							    <div class="col-sm-8">
							    	<div class="sub_logo col-xs-4">
							    	<img src="../img/defaultAvatar.png"style="vertical-align: middle;width: 90px;height: 90px;"  id="ImgPr2"/>
							    		<input type="file" id="up2" value="" multiple="multiple"/>
							    	</div>
							    <span class="media-middle" style="display: inline-block;margin-top: 30px;">建议上传尺寸90mm*50mm</span>
							    </div>
							  </div>
							  
							  <div class="form-group">
							<div class="row " style="padding-left: 20px;">	
								<div class="col-xs-offset-3 ">
									<label class="checkbox-inline col-xs-3 ">
									  <input type="checkbox" name="userpro" id="userpro" value="1">阅读并同意
									</label>
									<a type="button" style="display: inline-block;margin-top: 8px;margin-left: -20px;" data-toggle="modal" data-target="#myModal">点击查看用户协议</a>
								</div>
								
							</div>
							
							<input type="hidden" name="domain" id="domain" datatype='*' nullmsg="请阅读用户协议！" value="" />
							<input type="hidden" name="userId" id="userId" value="1" />
							  </div>
							  
							  <div class="form_tip">请上传真实有效的个人名片，名片上的公司应该与所认领的公司一致；请确认你是该公司的创始人或者其他的在职成员；请勿上传其他不相关的证件，以免影响程序的审核通过；上传图片支持2M以内的PNG,JPG,GIF格式</div>
							  <input type="button" class="btn btn-default center-block btn_next" value="提交"/>
							</form>
						

						</div>
				</div>
				
				
					
		
		
		<!-- Modal -->
		<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
		  <div class="modal-dialog" role="document">
		    <div class="modal-content">
		      <div class="modal-header">
		        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
		        <h4 class="modal-title" id="myModalLabel">Modal title</h4>
		      </div>
		      <div class="modal-body">
		        ...
		      </div>
		      <div class="modal-footer">
		        <button type="button" class="btn btn-default center-block" data-dismiss="modal">已阅读用户协议</button>
		        
		      </div>
		    </div>
		  </div>
		</div>	
			
		</div>
		
		
	
	</div>
	</body>
	<script src="../js/jquery-2.1.1.min.js"></script>
	<script type="text/javascript" src="../js/bootstrap.min.js" ></script>
	<script type="text/javascript" src="../js/Validform_v5.3.2_min.js" ></script>
	<script type="text/javascript" src="../js/uploadimg.js" ></script>
	<script type="text/javascript" src="../js/public.js"></script>
	<script type="text/javascript">
		

 $("#up").uploadPreview({ Img: "ImgPr", Width: 120, Height: 120 });
 $("#up2").uploadPreview({ Img: "ImgPr2", Width: 120, Height: 120 });
 var person = JSON.parse(sessionStorage.getItem("person"));
 console.log(person)
 var userId=person.userid;
 $('#userId').val(userId);
 
 
 
// 判断用户是否认证
	$.ajax({  
	          url: 'http://114.112.96.184:18080/auth/toStartup' ,
	          type: 'get',  
	          data: {'userId':userId},  
	          async: false,   
	          success: function (data) {  
	           console.log(data);
	           if(data.result > 0){
	           window.location.href='cyzfw_zuche.html';
	           }
	           if(data.result == 0){
	           		alert('信息正在审核，请勿重复认证')
	           }
	           
	          },  
	          error: function (returndata) {  
	              
	          }  
	     });  
 
	
		 
		$("#form_test2").Validform({
			btnSubmit:".btn_next",
			tiptype:1,
//		ajaxPost:true,
		beforeCheck:function(){
		$('#domain').val($('input[name="userpro"]:checked').val());
		},
		beforeSubmit:function(curform){
			doUpload();
			return false;

			},
		callback:function(data){
			console.log(data)
			
//		var obj=data.result;
//		var userId=obj.id;
		}
	});
	
	function reviewState(){
		
	}
	
	
	function doUpload() {  
	     var formData = new FormData($( "#form_test2" )[0]);  
	     $.ajax({  
	          url: 'http://114.112.96.184:18080/auth/startup' ,
	          type: 'POST',  
	          data: formData,  
	          async: false,  
	          cache: false,  
	          contentType: false,  
	          processData: false,  
	          success: function (data) {  
	           console.log(data);
	           if (data.code==000) {
//	           	sessionStorage.clear();
//	           	person.startup=true;
//	           	sessionStorage.setItem("person",JSON.stringify(person))
//	           window.location.href='cyzfw_zuche.html';
				alert('认证信息已提交，请耐心等待审核通过')
	           
	           } else{
	           	
	           }
	          },  
	          error: function (returndata) {  
	              alert(returndata);  
	          }  
	     });  
		}  
	</script>
</html>
